package im.yisme.view;

import android.app.Activity;
import android.content.Intent;
import im.yisme.view.service.ViewService;


public class ViewController implements ViewService{

	private static ViewController controller;
	private Activity topActivity;
	
	private ViewController(){
		
	}
	
	public static ViewController getInstance(){
		return controller == null ? controller = new ViewController() : controller;
	}
	
	public void jumpTo(Intent intent){
		topActivity.startActivity(intent);
		topActivity.finish();
	}

	public Activity getTopActivity() {
		return topActivity;
	}

	public void updateTopActivity(Activity topActivity){
		this.topActivity = topActivity;
	}
}
